﻿package wcl.json {
	import com.adobe.serialization.json.JSON;
	import flash.utils.ByteArray;
	
	/**
	 * ...
	 * @author ...
	 */
	public class JsonStr {
		public var bytes:ByteArray;
		
		public function JsonStr(o:Object):void {
			fromObject(o);
		}
		public function fromObject(o:Object):void {
			fromString(JSON.encode(o));
		}
		public function fromString(s:String):void{
			bytes = new ByteArray();
			bytes.writeUTFBytes(s);
		}
	}
	
}